﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestConsoleApp
{
    public class TestReverse
    {
        public static void Test()
        {
            int[] array = new int[6] { 1, 2, 3, 4, 5, 6 };

            reverse2(array);

            for (int i = 0; i < array.Count(); i++)
            {
                Console.WriteLine(array[i]);
            }

        }


        public static void reverse2(int[] array)
        {
            for (var i = 0; i < (array.Count() / 2); i++)
            {
                var temp = array[i];
                array[i] = array[array.Count() - 1 - i];
                array[array.Count() - 1 - i] = temp;
            }

        }
    }
}
